package com.estate.framework.web.service.data;


import com.estate.common.utils.TimeZoneUtils;

import java.time.LocalDateTime;
import java.time.ZoneId;

public class TimeZoneTest {


    public static void main(String[] args) {
        // 测试各种时间转换场景
        String[] testTimes = {
                "2025-10-16T14:05:40+11:00", // 悉尼夏令时
                "2025-06-16T14:05:40+10:00", // 悉尼标准时间
                "2025-10-16T14:05:40Z",      // UTC时间
        };

        for (String testTime : testTimes) {
            LocalDateTime systemTime = TimeZoneUtils.toSystemTime(testTime);
            LocalDateTime utcTime = TimeZoneUtils.toUTCTime(systemTime);
            LocalDateTime displayTime = TimeZoneUtils.toDisplayTime(systemTime);

            System.out.println("原始: " + testTime);
            System.out.println("系统: " + systemTime);
            System.out.println("UTC: " + utcTime);
            System.out.println("展示: " + displayTime);
            System.out.println("---");
        }
    }

}
